package com.ss.android.article.base.feature.detail.presenter;

import com.ss.android.article.base.feature.detail.model.ArticleInfo;
import com.ss.android.article.base.feature.model.Article;
import com.ss.android.common.load.AsyncLoader.LoaderProxy;

final class ArticleInfoLoader implements LoaderProxy<String, Article, String, Void, ArticleInfo> {
    private final DetailLoader mDetailLoader;

    ArticleInfoLoader(DetailLoader detailLoader) {
        this.mDetailLoader = detailLoader;

    }

    public final ArticleInfo doInBackground(String key, Article param, String extra) {
        return this.mDetailLoader.getArticleInfo(param, extra, this.mDetailLoader.article_page, this.mDetailLoader.useV16);
    }

    public final void onLoaded(String key, Article param, String extra, ArticleInfo result) {
        DetailLoader.Callback callback = this.mDetailLoader.mDetailLoaderCallbackRef.get();
        if (callback != null) {
            callback.onArticleInfoLoaded(param, result);
        }
    }
}

